package com.dianqiu.common.bean;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * DqLeagueMatchesId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class DqLeagueMatchesIdTO implements java.io.Serializable {

	private Integer lgId;
	private Integer round;
	private Integer homeClbId;
	private Integer awayClbId;

	@Column(name = "LG_ID", nullable = false)
	public Integer getLgId() {
		return this.lgId;
	}

	public void setLgId(Integer lgId) {
		this.lgId = lgId;
	}

	@Column(name = "ROUND", nullable = false)
	public Integer getRound() {
		return this.round;
	}

	public void setRound(Integer round) {
		this.round = round;
	}

	@Column(name = "HOME_CLB_ID", nullable = false)
	public Integer getHomeClbId() {
		return this.homeClbId;
	}

	public void setHomeClbId(Integer homeClbId) {
		this.homeClbId = homeClbId;
	}

	@Column(name = "AWAY_CLB_ID", nullable = false)
	public Integer getAwayClbId() {
		return this.awayClbId;
	}

	public void setAwayClbId(Integer awayClbId) {
		this.awayClbId = awayClbId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof DqLeagueMatchesIdTO))
			return false;
		DqLeagueMatchesIdTO castOther = (DqLeagueMatchesIdTO) other;

		return ((this.getLgId() == castOther.getLgId()) || (this.getLgId() != null
				&& castOther.getLgId() != null && this.getLgId().equals(
				castOther.getLgId())))
				&& ((this.getRound() == castOther.getRound()) || (this
						.getRound() != null
						&& castOther.getRound() != null && this.getRound()
						.equals(castOther.getRound())))
				&& ((this.getHomeClbId() == castOther.getHomeClbId()) || (this
						.getHomeClbId() != null
						&& castOther.getHomeClbId() != null && this
						.getHomeClbId().equals(castOther.getHomeClbId())))
				&& ((this.getAwayClbId() == castOther.getAwayClbId()) || (this
						.getAwayClbId() != null
						&& castOther.getAwayClbId() != null && this
						.getAwayClbId().equals(castOther.getAwayClbId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getLgId() == null ? 0 : this.getLgId().hashCode());
		result = 37 * result
				+ (getRound() == null ? 0 : this.getRound().hashCode());
		result = 37 * result
				+ (getHomeClbId() == null ? 0 : this.getHomeClbId().hashCode());
		result = 37 * result
				+ (getAwayClbId() == null ? 0 : this.getAwayClbId().hashCode());
		return result;
	}

}